package com.xudow.app.dynamicstate_old.module.discovery.search;

import com.jude.beam.expansion.list.BeamListFragmentPresenter;
import com.xudow.app.dynamicstate_old.data.DynamicModel;
import com.xudow.app.dynamicstate_old.domain.entity.UserInfoVo;

/**
 * Created by zhuchenxi on 16/6/24.
 */

public class UserSearchPresenter extends BeamListFragmentPresenter<UserSearchFragment,UserInfoVo> {


    String word;

    @Override
    public void onRefresh() {
        DynamicModel.getInstance().searchUser(word, 1, 20)
                .unsafeSubscribe(getRefreshSubscriber());
    }

    @Override
    public void onLoadMore() {
        DynamicModel.getInstance().searchUser(word, getCurPage() + 1, 20)
                .unsafeSubscribe(getMoreSubscriber());
    }
}
